﻿@{
    // By using a tag builder, sub items can alter the
    // menu element. Note how Display is called on the menu
    // items before the tag is actually rendered.

    TagBuilder tag = Tag(Model, "ul");

    foreach (var item in Model.Items)
    {
        tag.InnerHtml.AppendHtml(await DisplayAsync(item));
    }
}

<nav>
    @tag
</nav>